package com.CampaignManager.shared;

import java.io.Serializable;
import java.util.Date;

@SuppressWarnings("serial")
public class JobDTO implements Serializable {

	private String id;
	private String jobType;
	private String status;
	private String email;
	private String jobFor;
	private String destination;
	private Long reward;
	private Date taken;
	private String storyMessageID;
	private String storySubject;

	public String getStorySubject() {
		return storySubject;
	}
	public void setStorySubject(String storySubject) {
		this.storySubject = storySubject;
	}
	public String getStoryMessageID() {
		return storyMessageID;
	}
	public void setStoryMessageID(String storyMessageID) {
		this.storyMessageID = storyMessageID;
	}
	public String getJobFor() {
		return jobFor;
	}
	public void setJobFor(String jobFor) {
		this.jobFor = jobFor;
	}
	public Date getTaken() {
		return taken;
	}
	public void setTaken(Date taken) {
		this.taken = taken;
	}
	public String getDestination() {
		return destination;
	}
	public void setDestination(String destination) {
		this.destination = destination;
	}
	public Long getReward() {
		return reward;
	}
	public void setReward(Long reward) {
		this.reward = reward;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getJobType() {
		return jobType;
	}
	public void setJobType(String jobType) {
		this.jobType = jobType;
	}
	public String getStatus() {
		if (status == null) status = "Pending";
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	
	public String getJobDescription() {
		if (this.getJobType().equals("Battle")) {
			return this.getDestination()+" point Battle for "+this.getReward()+" gold";
		} else if (this.getJobType().equals("Delivery") || this.getJobType().equals("Escort")) {
			return this.getJobType()+" from "+this.getJobFor()+" to "+this.getDestination()+" for "+this.getReward()+" gold";
		} else if (this.getJobType().equals("Warmonger")) {
			return "Warmonger between "+this.getJobFor()+" and "+this.getDestination()+", level "+this.getReward();
		} else {
			return this.getJobType()+" against "+this.getJobFor()+", reward "+this.getReward();
		}
	}
}
